package org.zasadnyy.redlions.players.client;

import org.zasadnyy.redlions.players.client.ui.PlayerCanvas;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.util.SC;

public class PlayersApplication implements EntryPoint {

	private static class AdminApplicationUncaughtExceptionHandler implements
			GWT.UncaughtExceptionHandler {

		public void onUncaughtException(Throwable e) {
			SC.say("Error", e.getMessage() + e.getCause().toString());
		}
	}

	@Override
	public void onModuleLoad() {
		
		GWT.setUncaughtExceptionHandler(new AdminApplicationUncaughtExceptionHandler());

		PlayerCanvas playerCanvas = new PlayerCanvas();
		playerCanvas.draw();
		
		RootPanel.get("application").add(playerCanvas);
		
//		EditPlayersLayout layout = new EditPlayersLayout(new PlayersDataSource());
//		layout.draw();
//		
//		RootPanel.get("application").add(layout);

	}
}
